home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvtools / examples / fds / fdseval / fdsevallex.h < prev    next >
C/C++ Source or Header  |  1997-05-08  |  13KB  |  627 lines

  1. # include "stdio.h"
  2. # define U(x) x
  3. # define NLSTATE yyprevious=YYNEWLINE
  4. # define BEGIN yybgin = yysvec + 1 +
  5. # define INITIAL 0
  6. # define YYLERR yysvec
  7. # define YYSTATE (yyestate-yysvec-1)
  8. # define YYOPTIM 1
  9. # define YYLMAX BUFSIZ
  10. # define output(c) putc(c,yyout)
  11. # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
  12. # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
  13. # define yymore() (yymorfg=1)
  14. # define ECHO fprintf(yyout, "%s",yytext)
  15. # define REJECT { nstr = yyreject(); goto yyfussy;}
  16. int yyleng; extern char yytext[];
  17. int yymorfg;
  18. extern char *yysptr, yysbuf[];
  19. int yytchar;
  20. FILE *yyin = {stdin}, *yyout = {stdout};
  21. extern int yylineno;
  22. struct yysvf { 
  23.     struct yywork *yystoff;
  24.     struct yysvf *yyother;
  25.     int *yystops;};
  26. struct yysvf *yyestate;
  27. extern struct yysvf yysvec[], *yybgin;
  28. static char SccsId_lex[]="@(#)FDSeval.l    V1.6    3/30/92";
  29.  
  30. /* Trick lex into getting input from the expression string */
  31. /* String to be parsed */
  32. LOCAL CHAR *expression;
  33. LOCAL CHAR *ExpStart;
  34.  
  35. #undef input
  36. #define input() (*expression++)
  37.  
  38. #undef unput
  39. #define unput(c) (*--expression = c)
  40.  
  41. # define INCLUDE 2
  42. # define YYNEWLINE 10
  43. int yylex(){
  44. int nstr; 
  45. while((nstr = yylook()) >= 0)
  46. yyfussy: switch(nstr){
  47. case 0:
  48. if(yywrap()) return(0); break;
  49. case 1:
  50. { /* Include a file of expressions */
  51.         (VOID)S_STRCPY( id, &yytext[1] ); /* Skip the '!' */
  52.         if( debug ) (VOID)S_PRINTF("include file: %s\n", id );
  53.         return INCLUDE_FILE;
  54.         }
  55. break;
  56. case 2:
  57.     {
  58.         (VOID)S_SSCANF( &yytext[1], "%d", &CurrentArgIndex );
  59.         if( debug )
  60.           (VOID)S_PRINTF("Dsvar[%d] ", CurrentArgIndex );
  61.         return EXPR_ARG_MARKER;
  62.         }
  63. break;
  64. case 3:
  65. {
  66.         (VOID)S_STRCPY( id, yytext );
  67.         if( debug ) (VOID)S_PRINTF("<%s> ", id );
  68.         return ID;
  69.         }
  70. break;
  71. case 4:
  72.  {
  73.         (VOID)S_SSCANF( yytext, "%lf", &number );
  74.         if( debug ) (VOID)S_PRINTF("%f ", number );
  75.         return EVAL_NUMBER;
  76.         }
  77. break;
  78. case 5:
  79.  {
  80.         long i;
  81.         
  82.         (VOID)S_SSCANF( &yytext[2], "%lx", &i );
  83.         number = (double)i;
  84.         if( debug ) (VOID)S_PRINTF("%f ", number );
  85.         return EVAL_NUMBER;
  86.         }
  87. break;
  88. case 6:
  89. { /* C-style comment */
  90.         if( yytext[yyleng-1] == '*' )
  91.            yymore();
  92.         /* else ; */
  93.         }
  94. break;
  95. case 7:
  96.     {
  97.         if( debug ) (VOID)S_PRINTF("EQ " );
  98.         return EQ;
  99.         }
  100. break;
  101. case 8:
  102.     {
  103.         if( debug ) (VOID)S_PRINTF("NE " );
  104.         return NE;
  105.         }
  106. break;
  107. case 9:
  108.     {
  109.         if( debug ) (VOID)S_PRINTF("LE " );
  110.         return LE;
  111.         }
  112. break;
  113. case 10:
  114.     {
  115.         if( debug ) (VOID)S_PRINTF("LT " );
  116.         return LT;
  117.         }
  118. break;
  119. case 11:
  120.     {
  121.         if( debug ) (VOID)S_PRINTF("GE " );
  122.         return GE;
  123.         }
  124. break;
  125. case 12:
  126.     {
  127.         if( debug ) (VOID)S_PRINTF("GT " );
  128.         return GT;
  129.         }
  130. break;
  131. case 13:
  132.        ;
  133. break;
  134. case 14:
  135.     {
  136.         if( debug ) (VOID)S_PRINTF("\n" );
  137.         return TERMINATOR;
  138.         }
  139. break;
  140. case 15:
  141.     {
  142.         if( debug ) (VOID)S_PRINTF("'%c' ", yytext[0] );
  143.         return yytext[0];
  144.         }
  145. break;
  146. case -1:
  147. break;
  148. default:
  149. fprintf(yyout,"bad switch yylook %d",nstr);
  150. } return(0); }
  151. /* end of yylex */
  152.  
  153. INT yywrap() { return 1; }
  154. int yyvstop[] = {
  155. 0,
  156.  
  157. 15,
  158. 0,
  159.  
  160. 13,
  161. 15,
  162. 0,
  163.  
  164. 13,
  165. 0,
  166.  
  167. 15,
  168. 0,
  169.  
  170. 15,
  171. 0,
  172.  
  173. 4,
  174. 15,
  175. 0,
  176.  
  177. 15,
  178. 0,
  179.  
  180. 4,
  181. 15,
  182. 0,
  183.  
  184. 4,
  185. 15,
  186. 0,
  187.  
  188. 14,
  189. 15,
  190. 0,
  191.  
  192. 10,
  193. 15,
  194. 0,
  195.  
  196. 15,
  197. 0,
  198.  
  199. 12,
  200. 15,
  201. 0,
  202.  
  203. 3,
  204. 15,
  205. 0,
  206.  
  207. 1,
  208. 0,
  209.  
  210. 8,
  211. 0,
  212.  
  213. 2,
  214. 0,
  215.  
  216. 4,
  217. 0,
  218.  
  219. 4,
  220. 0,
  221.  
  222. 9,
  223. 0,
  224.  
  225. 7,
  226. 0,
  227.  
  228. 11,
  229. 0,
  230.  
  231. 3,
  232. 0,
  233.  
  234. 4,
  235. 0,
  236.  
  237. 5,
  238. 0,
  239.  
  240. 6,
  241. 0,
  242. 0};
  243. # define YYTYPE char
  244. struct yywork { YYTYPE verify, advance; } yycrank[] = {
  245. 0,0,    0,0,    1,5,    0,0,    
  246. 0,0,    0,0,    0,0,    0,0,    
  247. 0,0,    0,0,    1,6,    1,7,    
  248. 6,7,    6,7,    0,0,    0,0,    
  249. 0,0,    0,0,    0,0,    0,0,    
  250. 0,0,    0,0,    0,0,    0,0,    
  251. 0,0,    0,0,    0,0,    0,0,    
  252. 0,0,    0,0,    0,0,    0,0,    
  253. 0,0,    0,0,    1,8,    6,7,    
  254. 0,0,    1,9,    0,0,    0,0,    
  255. 0,0,    2,8,    0,0,    0,0,    
  256. 2,9,    11,25,    0,0,    1,10,    
  257. 1,11,    1,12,    1,13,    3,8,    
  258. 34,34,    0,0,    3,9,    4,8,    
  259. 0,0,    34,36,    4,9,    0,0,    
  260. 1,14,    1,15,    1,16,    1,17,    
  261. 15,28,    16,29,    1,18,    2,14,    
  262. 2,15,    2,16,    2,17,    17,30,    
  263. 1,18,    0,0,    0,0,    0,0,    
  264. 0,0,    3,14,    3,15,    3,16,    
  265. 3,17,    4,14,    4,15,    4,16,    
  266. 4,17,    8,19,    8,19,    8,19,    
  267. 8,19,    8,19,    8,19,    8,19,    
  268. 8,19,    8,19,    8,19,    8,19,    
  269. 8,19,    0,0,    0,0,    0,0,    
  270. 8,20,    0,0,    0,0,    0,0,    
  271. 8,19,    8,19,    8,19,    8,19,    
  272. 8,19,    8,19,    8,19,    8,19,    
  273. 8,19,    8,19,    8,19,    8,19,    
  274. 8,19,    8,19,    8,19,    8,19,    
  275. 8,19,    8,19,    8,19,    8,19,    
  276. 8,19,    8,19,    8,19,    8,19,    
  277. 8,19,    8,19,    0,0,    0,0,    
  278. 0,0,    0,0,    8,19,    0,0,    
  279. 8,19,    8,19,    8,19,    8,19,    
  280. 8,19,    8,19,    8,19,    8,19,    
  281. 8,19,    8,19,    8,19,    8,19,    
  282. 8,19,    8,19,    8,19,    8,19,    
  283. 8,19,    8,19,    8,19,    8,19,    
  284. 8,19,    8,19,    8,19,    8,19,    
  285. 8,19,    8,19,    0,0,    0,0,    
  286. 0,0,    8,21,    9,22,    9,22,    
  287. 9,22,    9,22,    9,22,    9,22,    
  288. 9,22,    9,22,    9,22,    10,23,    
  289. 10,23,    10,23,    10,23,    10,23,    
  290. 10,23,    10,23,    10,23,    10,23,    
  291. 10,23,    32,33,    32,33,    32,33,    
  292. 32,33,    32,33,    32,33,    32,33,    
  293. 32,33,    32,33,    32,33,    12,23,    
  294. 10,24,    12,26,    12,26,    12,26,    
  295. 12,26,    12,26,    12,26,    12,26,    
  296. 12,26,    12,26,    12,26,    0,0,    
  297. 0,0,    0,0,    0,0,    0,0,    
  298. 0,0,    0,0,    0,0,    0,0,    
  299. 0,0,    0,0,    12,24,    0,0,    
  300. 0,0,    0,0,    0,0,    0,0,    
  301. 0,0,    0,0,    0,0,    13,23,    
  302. 10,24,    13,26,    13,26,    13,26,    
  303. 13,26,    13,26,    13,26,    13,26,    
  304. 13,26,    13,26,    13,26,    0,0,    
  305. 0,0,    0,0,    0,0,    0,0,    
  306. 0,0,    0,0,    0,0,    0,0,    
  307. 0,0,    0,0,    12,24,    0,0,    
  308. 0,0,    18,31,    18,31,    18,31,    
  309. 18,31,    18,31,    18,31,    18,31,    
  310. 18,31,    18,31,    18,31,    0,0,    
  311. 0,0,    0,0,    0,0,    0,0,    
  312. 0,0,    12,27,    18,31,    18,31,    
  313. 18,31,    18,31,    18,31,    18,31,    
  314. 18,31,    18,31,    18,31,    18,31,    
  315. 18,31,    18,31,    18,31,    18,31,    
  316. 18,31,    18,31,    18,31,    18,31,    
  317. 18,31,    18,31,    18,31,    18,31,    
  318. 18,31,    18,31,    18,31,    18,31,    
  319. 0,0,    0,0,    0,0,    0,0,    
  320. 18,31,    0,0,    18,31,    18,31,    
  321. 18,31,    18,31,    18,31,    18,31,    
  322. 18,31,    18,31,    18,31,    18,31,    
  323. 18,31,    18,31,    18,31,    18,31,    
  324. 18,31,    18,31,    18,31,    18,31,    
  325. 18,31,    18,31,    18,31,    18,31,    
  326. 18,31,    18,31,    18,31,    18,31,    
  327. 19,19,    19,19,    19,19,    19,19,    
  328. 19,19,    19,19,    19,19,    19,19,    
  329. 19,19,    19,19,    19,19,    19,19,    
  330. 0,0,    0,0,    0,0,    0,0,    
  331. 0,0,    0,0,    0,0,    19,19,    
  332. 19,19,    19,19,    19,19,    19,19,    
  333. 19,19,    19,19,    19,19,    19,19,    
  334. 19,19,    19,19,    19,19,    19,19,    
  335. 19,19,    19,19,    19,19,    19,19,    
  336. 19,19,    19,19,    19,19,    19,19,    
  337. 19,19,    19,19,    19,19,    19,19,    
  338. 19,19,    0,0,    0,0,    0,0,    
  339. 0,0,    19,19,    0,0,    19,19,    
  340. 19,19,    19,19,    19,19,    19,19,    
  341. 19,19,    19,19,    19,19,    19,19,    
  342. 19,19,    19,19,    19,19,    19,19,    
  343. 19,19,    19,19,    19,19,    19,19,    
  344. 19,19,    19,19,    19,19,    19,19,    
  345. 19,19,    19,19,    19,19,    19,19,    
  346. 19,19,    24,32,    0,0,    0,0,    
  347. 24,33,    24,33,    24,33,    24,33,    
  348. 24,33,    24,33,    24,33,    24,33,    
  349. 24,33,    24,33,    25,25,    0,0,    
  350. 0,0,    0,0,    0,0,    0,0,    
  351. 0,0,    0,0,    25,25,    25,25,    
  352. 26,23,    0,0,    26,26,    26,26,    
  353. 26,26,    26,26,    26,26,    26,26,    
  354. 26,26,    26,26,    26,26,    26,26,    
  355. 0,0,    0,0,    0,0,    0,0,    
  356. 0,0,    0,0,    0,0,    0,0,    
  357. 0,0,    0,0,    0,0,    0,0,    
  358. 0,0,    0,0,    0,0,    0,0,    
  359. 0,0,    0,0,    0,0,    25,34,    
  360. 0,0,    0,0,    0,0,    25,25,    
  361. 25,0,    25,25,    25,25,    0,0,    
  362. 0,0,    0,0,    0,0,    0,0,    
  363. 27,35,    27,35,    27,35,    27,35,    
  364. 27,35,    27,35,    27,35,    27,35,    
  365. 27,35,    27,35,    25,25,    0,0,    
  366. 0,0,    0,0,    0,0,    0,0,    
  367. 25,25,    27,35,    27,35,    27,35,    
  368. 27,35,    27,35,    27,35,    0,0,    
  369. 0,0,    0,0,    0,0,    0,0,    
  370. 0,0,    0,0,    0,0,    0,0,    
  371. 0,0,    0,0,    0,0,    0,0,    
  372. 0,0,    0,0,    0,0,    0,0,    
  373. 0,0,    0,0,    0,0,    0,0,    
  374. 0,0,    0,0,    0,0,    0,0,    
  375. 0,0,    27,35,    27,35,    27,35,    
  376. 27,35,    27,35,    27,35,    0,0,    
  377. 0,0};
  378. struct yysvf yysvec[] = {
  379. 0,    0,    0,
  380. yycrank+-1,    0,        0,    
  381. yycrank+-8,    yysvec+1,    0,    
  382. yycrank+-18,    yysvec+1,    0,    
  383. yycrank+-22,    yysvec+1,    0,    
  384. yycrank+0,    0,        yyvstop+1,
  385. yycrank+3,    0,        yyvstop+3,
  386. yycrank+0,    yysvec+6,    yyvstop+6,
  387. yycrank+39,    0,        yyvstop+8,
  388. yycrank+117,    0,        yyvstop+10,
  389. yycrank+127,    0,        yyvstop+12,
  390. yycrank+3,    0,        yyvstop+15,
  391. yycrank+149,    0,        yyvstop+17,
  392. yycrank+181,    yysvec+10,    yyvstop+20,
  393. yycrank+0,    0,        yyvstop+23,
  394. yycrank+3,    0,        yyvstop+26,
  395. yycrank+4,    0,        yyvstop+29,
  396. yycrank+10,    0,        yyvstop+31,
  397. yycrank+205,    0,        yyvstop+34,
  398. yycrank+282,    0,        yyvstop+37,
  399. yycrank+0,    0,        yyvstop+39,
  400. yycrank+0,    yysvec+19,    0,    
  401. yycrank+0,    0,        yyvstop+41,
  402. yycrank+0,    yysvec+10,    yyvstop+43,
  403. yycrank+360,    0,        0,    
  404. yycrank+-417,    0,        0,    
  405. yycrank+382,    yysvec+10,    yyvstop+45,
  406. yycrank+424,    0,        0,    
  407. yycrank+0,    0,        yyvstop+47,
  408. yycrank+0,    0,        yyvstop+49,
  409. yycrank+0,    0,        yyvstop+51,
  410. yycrank+0,    yysvec+18,    yyvstop+53,
  411. yycrank+137,    0,        0,    
  412. yycrank+0,    yysvec+32,    yyvstop+55,
  413. yycrank+-10,    yysvec+25,    0,    
  414. yycrank+0,    yysvec+27,    yyvstop+57,
  415. yycrank+0,    0,        yyvstop+59,
  416. 0,    0,    0};
  417. struct yywork *yytop = yycrank+526;
  418. struct yysvf *yybgin = yysvec+1;
  419. char yymatch[] = {
  420. 00  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  421. 01  ,011 ,012 ,01  ,01  ,01  ,01  ,01  ,
  422. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  423. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  424. 011 ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  425. 01  ,01  ,01  ,01  ,01  ,01  ,'.' ,'/' ,
  426. '0' ,'1' ,'1' ,'1' ,'1' ,'1' ,'1' ,'1' ,
  427. '1' ,'1' ,01  ,01  ,01  ,01  ,01  ,01  ,
  428. 01  ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'G' ,
  429. 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
  430. 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
  431. 'G' ,'G' ,'G' ,01  ,01  ,01  ,01  ,'G' ,
  432. 01  ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'G' ,
  433. 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
  434. 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
  435. 'G' ,'G' ,'G' ,01  ,01  ,01  ,01  ,01  ,
  436. 0};
  437. char yyextra[] = {
  438. 0,0,0,0,0,0,0,0,
  439. 0,0,0,0,0,0,0,0,
  440. 0};
  441. #ifndef lint
  442. static    char ncform_sccsid[] = "@(#)ncform 1.6 88/02/08 SMI"; /* from S5R2 1.2 */
  443. #endif
  444.  
  445. int yylineno =1;
  446. # define YYU(x) x
  447. # define NLSTATE yyprevious=YYNEWLINE
  448. char yytext[YYLMAX];
  449. struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
  450. char yysbuf[YYLMAX];
  451. char *yysptr = yysbuf;
  452. int *yyfnd;
  453. extern struct yysvf *yyestate;
  454. int yyprevious = YYNEWLINE;
  455. int yylook(){
  456.     register struct yysvf *yystate, **lsp;
  457.     register struct yywork *yyt;
  458.     struct yysvf *yyz;
  459.     int yych, yyfirst;
  460.     struct yywork *yyr;
  461. # ifdef LEXDEBUG
  462.     int debug;
  463. # endif
  464.     char *yylastch;
  465.     /* start off machines */
  466. # ifdef LEXDEBUG
  467.     debug = 0;
  468. # endif
  469.     yyfirst=1;
  470.     if (!yymorfg)
  471.         yylastch = yytext;
  472.     else {
  473.         yymorfg=0;
  474.         yylastch = yytext+yyleng;
  475.         }
  476.     for(;;){
  477.         lsp = yylstate;
  478.         yyestate = yystate = yybgin;
  479.         if (yyprevious==YYNEWLINE) yystate++;
  480.         for (;;){
  481. # ifdef LEXDEBUG
  482.             if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
  483. # endif
  484.             yyt = yystate->yystoff;
  485.             if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
  486.                 yyz = yystate->yyother;
  487.                 if(yyz == 0)break;
  488.                 if(yyz->yystoff == yycrank)break;
  489.                 }
  490.             *yylastch++ = yych = input();
  491.             yyfirst=0;
  492.         tryagain:
  493. # ifdef LEXDEBUG
  494.             if(debug){
  495.                 fprintf(yyout,"char ");
  496.                 allprint(yych);
  497.                 putchar('\n');
  498.                 }
  499. # endif
  500.             yyr = yyt;
  501.             if ( (int)yyt > (int)yycrank){
  502.                 yyt = yyr + yych;
  503.                 if (yyt <= yytop && yyt->verify+yysvec == yystate){
  504.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  505.                         {unput(*--yylastch);break;}
  506.                     *lsp++ = yystate = yyt->advance+yysvec;
  507.                     goto contin;
  508.                     }
  509.                 }
  510. # ifdef YYOPTIM
  511.             else if((int)yyt < (int)yycrank) {        /* r < yycrank */
  512.                 yyt = yyr = yycrank+(yycrank-yyt);
  513. # ifdef LEXDEBUG
  514.                 if(debug)fprintf(yyout,"compressed state\n");
  515. # endif
  516.                 yyt = yyt + yych;
  517.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  518.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  519.                         {unput(*--yylastch);break;}
  520.                     *lsp++ = yystate = yyt->advance+yysvec;
  521.                     goto contin;
  522.                     }
  523.                 yyt = yyr + YYU(yymatch[yych]);
  524. # ifdef LEXDEBUG
  525.                 if(debug){
  526.                     fprintf(yyout,"try fall back character ");
  527.                     allprint(YYU(yymatch[yych]));
  528.                     putchar('\n');
  529.                     }
  530. # endif
  531.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  532.                     if(yyt->advance+yysvec == YYLERR)    /* error transition */
  533.                         {unput(*--yylastch);break;}
  534.                     *lsp++ = yystate = yyt->advance+yysvec;
  535.                     goto contin;
  536.                     }
  537.                 }
  538.             if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
  539. # ifdef LEXDEBUG
  540.                 if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
  541. # endif
  542.                 goto tryagain;
  543.                 }
  544. # endif
  545.             else
  546.                 {unput(*--yylastch);break;}
  547.         contin:
  548. # ifdef LEXDEBUG
  549.             if(debug){
  550.                 fprintf(yyout,"state %d char ",yystate-yysvec-1);
  551.                 allprint(yych);
  552.                 putchar('\n');
  553.                 }
  554. # endif
  555.             ;
  556.             }
  557. # ifdef LEXDEBUG
  558.         if(debug){
  559.             fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
  560.             allprint(yych);
  561.             putchar('\n');
  562.             }
  563. # endif
  564.         while (lsp-- > yylstate){
  565.             *yylastch-- = 0;
  566.             if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
  567.                 yyolsp = lsp;
  568.                 if(yyextra[*yyfnd]){        /* must backup */
  569.                     while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
  570.                         lsp--;
  571.                         unput(*yylastch--);
  572.                         }
  573.                     }
  574.                 yyprevious = YYU(*yylastch);
  575.                 yylsp = lsp;
  576.                 yyleng = yylastch-yytext+1;
  577.                 yytext[yyleng] = 0;
  578. # ifdef LEXDEBUG
  579.                 if(debug){
  580.                     fprintf(yyout,"\nmatch ");
  581.                     sprint(yytext);
  582.                     fprintf(yyout," action %d\n",*yyfnd);
  583.                     }
  584. # endif
  585.                 return(*yyfnd++);
  586.                 }
  587.             unput(*yylastch);
  588.             }
  589.         if (yytext[0] == 0  /* && feof(yyin) */)
  590.             {
  591.             yysptr=yysbuf;
  592.             return(0);
  593.             }
  594.         yyprevious = yytext[0] = input();
  595.         if (yyprevious>0)
  596.             output(yyprevious);
  597.         yylastch=yytext;
  598. # ifdef LEXDEBUG
  599.         if(debug)putchar('\n');
  600. # endif
  601.         }
  602.     }
  603. int yyback(p, m)
  604.     int *p;
  605.         int m;
  606. {
  607. if (p==0) return(0);
  608. while (*p)
  609.     {
  610.     if (*p++ == m)
  611.         return(1);
  612.     }
  613. return(0);
  614. }
  615.     /* the following are only used in the lex library */
  616. int yyinput(){
  617.     return(input());
  618.     }
  619. int yyoutput(c)
  620.   int c; {
  621.     return output(c);
  622.     }
  623. int yyunput(c)
  624.    int c; {
  625.     return unput(c);
  626.     }
  627.